{% extends "blog/admin/base.html" %}
{% load pagebase %}
{% load components.sidebar %}
{% block title %}撰写{% endblock %}
{% block head_link %}{% endblock %}
{% block styles %}

{% endblock %}
{% block scripts %}
{{ "blog/admin/post-add.js"|include_js }}
<script type="text/javascript">
	
	PostAdd.init({
		
	});
</script>
{% endblock %}
{% block submenu %}
<ul>
	<li>
		<a href="#">撰写文章</a>
	</li>
	<li>
		<a href="#">撰写页面</a>
	</li>
</ul>
{% endblock %}
{% block main %}
<div id="post-sidebar">
	<ul class="out">
		<li class="out">
			<a href="#" class="panel-title">发布</a>
			<ul id="post-buttons">
				<li>
					<button name="button-save-draf" type="button">保存为草稿</button>
					<button name="button-save" type="button" class="submit">发布</button>
				</li>
				<li>
					状态：<span class="status">未保存</span>
				</li>
			</ul>
		</li>
	</ul>
	<ul class="out">
		<li class="out">
			<a href="#" class="panel-title">分类</a>
			<div class="form">
				<p><input type="text" class="text" name="category-new" value="" /> <button name="category-button" type="button">添加</button></p>
				<p class="tip">多个类别请用英文逗号隔开。</p>
			</div>
			<ul id="sidebar-category">
				<li>
					
				</li>
				{% for cate in categorys %}
				<li> 
					<label for="category{{ cate.id }}"><input id="category{{ cate.id }}" type="checkbox" name="category" value="{{ cate.id }}" /> {{ cate.name }} [{{cate.post_count}}]</label>
				</li>
				{% endfor %}

			</ul>
		</li>
		<li class="out">
			<a href="#" class="panel-title">评论</a>
			<ul>
				<li>
					<label for="allow-comment"><input type="checkbox" id="allow-comment" name="allow-comment" value="1" /> 允许评论</label>
				</li>
			</ul>
		</li>
	</ul>
</div>
<div id="post-main">
	<form method="post" action="">
		<fieldset>
			<div class="input">
				<input type="text" name="post-title" id="post-title" class="text long" />
			</div>
			<div class="input-url">
				永久链接：{{ current_profile.get_url }}<span id="post-url"></span>
			</div>
		</fieldset>
		<fieldset>
			<div class="input">
				<textarea name="post-body" style=" width:750px; height:100px; " class="text" id="post-body">测试内容<html></textarea>
			</div>			
		</fieldset>
		<div class="panel">
			<div class="title">SEO 信息</div>
			<ul id="panel-seo">
				
				<li>
					<label for="meta-descriptions">Meta Description：</label><textarea id="meta-descriptions" name="meta-descriptions" class="text long"></textarea>			
				</li>
				<li>
					<label for="meta-keywords">Meta Keywords：</label><input class="text long" type="text" id="meta-keywords" name="meta-keywords" value="" />
				</li>
			</ul>
		</div>
	</form>
</div>
{% endblock %}